Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lint/useIsNan): add code fix action #125

Merged
merged 7 commits into from
Sep 9, 2023

Conversation

victor-teles
Copy link
Contributor

Summary

Closes #96

Provide code fix for useIsNaN rule:

- 123 == NaN
+ Number.isNaN(123)
- 123 === NaN
+ Number.isNaN(123)
- 123 !== NaN
+ !Number.isNaN(123)
- 123 != NaN
+ !Number.isNaN(123)

Should this rule support other operators like > < >= <=?

Test Plan

  • Manual testing code fix using CLI :)

@github-actions github-actions bot added A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages labels Sep 2, 2023
@victor-teles victor-teles changed the title feat(use-is-nan): add code fix action feat(lint/useIsNan): add code fix action Sep 2, 2023
@victor-teles victor-teles marked this pull request as ready for review September 3, 2023 01:11
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! We're almost there, there are a couple of cases that need extra attention

Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a significant contribution! Thank you!

Copy link
Member

@Conaclos Conaclos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution!

@ematipico
Copy link
Member

Rebasing the PR should make the CI pass

@Conaclos Conaclos merged commit 424f68d into biomejs:main Sep 9, 2023
14 checks passed
@Conaclos
Copy link
Member

Conaclos commented Sep 9, 2023

Time to merge 🚀. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 lint/useIsNan should provide a code fix
3 participants